<template>
  <div>
    <div class="box">
        <h1>GetInfo组件</h1>
        <hr>
        <input type="button" @click="getInfo" value="发起GET请求" style="color:white;background-color:blue">
    </div>


  </div>
</template>

<script>
export default {
    name:'GetInfo',
    methods:{
       async getInfo(){
         const {data:res}=  await this.$http.get('/api/get',{
                params:{
                    name:'ls',
                    age:33
                }
            })
            console.log(res);
        }
    }

}
</script>

<style scoped>


.box{
    border: 1px solid black;
    height: 300px;
    width: 300px;
}
</style>